From: Dan Winship Date: Wed, 9 Mar 2011 13:58:27 +0000 (-0500) Subject: ShellWindowTracker: don't create ShellApps for non-interesting windows X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8651 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=43020b20b770096e208be4eceae360b0020b5c42;p=gnome-shell.git ShellWindowTracker: don't create ShellApps for non-interesting windows If a process does not have any "interesting" windows, then it can't be considered a running app. (Previously we were calling get_app_for_window() before ruling out non-interesting windows, which ended up calling _shell_app_new_for_window(), which would add the window to the ShellApp directly, bypassing the is_interesting check.) https://bugzilla.gnome.org/show_bug.cgi?id=642221 --- diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c index d2889236f..44a4a48e3 100644 --- a/src/shell-window-tracker.c +++ b/src/shell-window-tracker.c @@ -225,23 +225,6 @@ get_appid_from_window (MetaWindow *window) return appid_guess; } -/** - * window_is_tracked: - * - * We don't attempt to associate override-redirect windows with applications - * at all, since there's no reason to do so yet. - * - * Returns: %TRUE iff we want to scan this window for application association - */ -static gboolean -window_is_tracked (MetaWindow *window) -{ - if (meta_window_is_override_redirect (window)) - return FALSE; - - return TRUE; -} - /** * shell_window_tracker_is_window_interesting: * @@ -529,7 +512,7 @@ track_window (ShellWindowTracker *self, { ShellApp *app; - if (!window_is_tracked (window)) + if (!shell_window_tracker_is_window_interesting (window)) return; app = get_app_for_window (self, window); @@ -539,10 +522,6 @@ track_window (ShellWindowTracker *self, /* At this point we've stored the association from window -> application */ g_hash_table_insert (self->window_to_app, window, app); - /* However, only put interesting windows in the window list for an app. */ - if (!shell_window_tracker_is_window_interesting (window)) - return; - if (shell_app_is_transient (app)) { /* For a transient application, it's possible one of our title regexps